﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MaxLeaf.Platform.DataContract;
using CommonsLib.DB;
using MaxLeaf.Platform.DALImplementation;
using MaxLeaf.Platform.Functions;
using CommonsLib.Utility;
using MaxLeaf.Platform.Commons;

namespace MaxLeaf.Platform.BLLImplementation
{
    public class imStoresOutputDtlBLL:BaseBLL
    {
        
        public override string FinterIDFields
        {
            get
            {
                return string.Format("{0},{1}", "DtlID", (int)FinterIDType.StoresOutputDtl);
            }
        }


        internal List<int> GetUnpostKeys(int intHdrID)
        {
            using (DBAccess dbcon = DataFunc.GetDBAccessByDataModelType(typeof(imStoresOutputDtlDataModel)))
            {
                return ((imStoresOutputDtlDAL)this.CurrentDAL).GetUnpostKeys(dbcon, intHdrID);
            }
        }

        internal void SetPosted(DBAccess dbcon, int intKey, int intOtherOutputHdrId, int intOtherOutputDtlId)
        {
            ((imStoresOutputDtlDAL)this.CurrentDAL).SetPosted(dbcon, intKey, intOtherOutputHdrId, intOtherOutputDtlId);
        }

        internal void SetUnPosted(DBAccess dbcon, int intStoresOutputHdrId, int intStoresOutputDtlId, double dblStoresOutputQty)
        {
            ((imStoresOutputDtlDAL)this.CurrentDAL).SetUnPosted(dbcon, intStoresOutputHdrId, intStoresOutputDtlId, dblStoresOutputQty);
        }
    }
}
